import { nanoid } from 'nanoid'

class FingerPrint {
  gen = () => {
    const uuid = localStorage.getItem(
      'fingerprint'
    )
    if (!uuid) {
      localStorage.setItem(
        'fingerprint',
        nanoid()
      )
    }
    return this.get()
  }

  get = () => {
    return localStorage.getItem('fingerprint')
  }
}

export default FingerPrint
